import Vue from 'vue'
import Router from 'vue-router'
import Login from './pages/login/Login'
import Index from './pages/index/Index'
import User from './pages/index/components/User'
import Device from './pages/index/components/Device'
import Car from './pages/index/components/Car'
import House from './pages/index/components/House'
import Land from './pages/index/components/Land'
import Book from './pages/index/components/Book'
import Access from './pages/index/components/Access'
import Access_admin from './pages/index/components/Access_admin'
import Register from './pages/index/components/Register'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login,
      hidden: true
    },
    {
      path: '/',
        component: Index,
        name: '系统管理',
        iconCls: 'el-icon-message',//图标样式class
        leaf: true,
        children: [
            { path: '/user', component: User, name: '用户管理' },
        ]
    },
    {
       path: '/',
        component: Index,
        name: '',
        iconCls: 'el-icon-message',
        leaf: true,//只有一个节点
        children: [
            { path: '/device', component: Device, name: '设备管理' }
        ]
    },
      {
       path: '/',
        component: Index,
        name: '',
        iconCls: 'el-icon-message',
        leaf: true,//只有一个节点
        children: [
            { path: '/car', component: Car, name: '车辆管理' }
        ]
    },
      {
       path: '/',
        component: Index,
        name: '',
        iconCls: 'el-icon-message',
        leaf: true,//只有一个节点
        children: [
            { path: '/house', component: House, name: '房屋管理' }
        ]
    },
      {
       path: '/',
        component: Index,
        name: '',
        iconCls: 'el-icon-message',
        leaf: true,//只有一个节点
        children: [
            { path: '/land', component: Land, name: '土地管理' }
        ]
    },
     {
        path: '/',
        component: Index,
        name: '',
        iconCls: 'el-icon-message',
        leaf: true,//只有一个节点
        children: [
            { path: '/book', component: Book, name: '图书管理' }
        ]
    },
    {
        path: '/',
        component: Index,
        name: '操作',
        iconCls: 'el-icon-message',
        children: [
            { path: '/access', component: Access, name: '资产申请' },
            { path: '/register', component: Register, name: '资产登记注册' },
            { path: '/access_admin', component: Access_admin, name: '管理者资产申请' }
        ]
    },
  ]
})